#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define y1 y_alpha_1

using namespace std;

using ll = long long;
using db = double;
using vec = vector<int>;
using pii = pair<int,int>;

int read(){
	int x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-',ch = getchar();
	while(isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48),ch = getchar();
	return f ? -x : x;
}

int main(){
#ifndef ONLINE_JUDGE
	freopen("p099.txt","r",stdin);
#endif
	db mx = 0; int id = 0;
	for(int i = 1;i <= 1000;i++){
		int x = in,y = in; db res = log(x) * y; 
		if(res > mx) mx = res,id = i;
	}
	printf("%d\n",id);
	return 0;
}
